const http = uni.$u.http
// 查询搜索历史
export const getSearchHistory = (data, config = { }) => 
	http.get('/index/searchHistory/searchHistoryList', Object.assign({ }, config, {
		params: data,
	},)
)

// 查询商品
export const getSearchGoods = (data, config = { }) => 
	http.get('/index/goods/es/search', Object.assign({ }, config, {
		params: data,
	},)
)

// 搜索分类
export const getCategory = (data, config = { }) => 
	http.get('/index/goods/es/category', Object.assign({ }, config, {
		params: data,
	},)
)

// 新增历史记录
export const addSearchHistory = (data, config = { }) => 
	http.get('/index/searchHistory/addSearchHistory', Object.assign({ }, config, {
		params: data,
	},)
)

// 删除历史记录
export const delSearchHistory = (data, config = { }) => 
	http.get('/index/searchHistory/delSearchHistory', Object.assign({ }, config, {
		params: data,
	},)
)